<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <title>用户登录</title>
    <style>
        body {
            text-align: center;
        }
        table {
            margin: auto;
        }
        td {
            text-align: right;
            padding-right: 10px;
        }

        input[type="text"], input[type="password"] {
            text-align: left;
        }

        .button-container {
            margin-top: 20px;
        }
        .button-container button {
            margin: 0 10px;
        }
        h2 {
            font-size: 40px;
            font-weight: 700;
            font-family: 宋体, serif;
        }
    </style>
    <script>
        function clearForm() {
            // 获取表单中的用户名和密码输入框
            var usernameInput = document.getElementById('username');
            var passwordInput = document.getElementById('password');

            // 清空输入框的内容
            usernameInput.value = '';
            passwordInput.value = '';
        }
    </script>
</head>
<body>
<h2>用户登录</h2>
<form action="chkuser.jsp" method="post">
    <table>
        <tr>
            <td><label for="username">用户名:</label></td>
            <td><input type="text" id="username" name="username" required></td>
        </tr>
        <tr>
            <td><label for="password">密码:</label></td>
            <td><input type="password" id="password" name="password" required></td>
        </tr>
    </table>
    <div class="button-container">
        <button type="submit">确定</button>
        <button type="button" onclick="clearForm()">取消</button>
        <button type="button" onclick="window.location='register.jsp'">注册</button>
    </div>
</form>
</body>
</html>